{include file="common/header" /}

<div class="container" style="padding-top: 30px; padding-bottom: 50px;">
  <!-- 内联样式确保基本内容可见 -->
  <style>
    /* 基础样式，确保内容可见 */
    .activity-cards-container {
      display: flex;
      flex-wrap: wrap;
      gap: 20px;
      justify-content: center;
    }
    
    .activity-card {
      flex: 0 0 calc(33.333% - 20px);
      min-width: 250px;
      border: 1px solid #eee;
      border-radius: 10px;
      padding: 15px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
      margin-bottom: 20px;
      background-color: white;
    }
    
    .activity-card img {
      width: 100%;
      height: 180px;
      object-fit: cover;
      border-radius: 8px;
    }
    
    .activity-nav {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 10px;
      margin-bottom: 30px;
    }
    
    .activity-nav a {
      padding: 8px 15px;
      font-size: 14px;
      white-space: nowrap;
      border-radius: 20px;
      text-decoration: none;
      font-weight: bold;
    }
    
    .activity-nav a.active {
      background-color: #f08a5d;
      color: white;
    }
    
    .activity-nav a:not(.active) {
      background-color: #f8f8f8;
      color: #636e72;
    }
    
    /* 响应式设计 */
    @media (max-width: 768px) {
      .activity-card {
        flex: 0 0 calc(50% - 15px);
      }
    }
    
    @media (max-width: 576px) {
      .activity-card {
        flex: 0 0 100%;
      }
    }
  </style>

<!-- 全新设计的倒计时样式 -->
<style>
/* 全新的倒计时样式 */
.countdown-container {
  position: relative;
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
}

/* 紧急倒计时样式 - 红色主题 */
.countdown-urgent {
  background: linear-gradient(135deg, rgba(252, 92, 101, 0.15), rgba(252, 92, 101, 0.05));
  border: 1px solid rgba(252, 92, 101, 0.2);
  box-shadow: 0 10px 25px rgba(252, 92, 101, 0.15);
}

/* 普通倒计时样式 - 橙色主题 */
.countdown-normal {
  background: linear-gradient(135deg, rgba(240, 138, 93, 0.15), rgba(240, 138, 93, 0.05));
  border: 1px solid rgba(240, 138, 93, 0.2);
  box-shadow: 0 10px 25px rgba(240, 138, 93, 0.15);
}

/* 免费赠送倒计时样式 - 绿色主题 */
.countdown-free {
  background: linear-gradient(135deg, rgba(38, 222, 129, 0.15), rgba(38, 222, 129, 0.05));
  border: 1px solid rgba(38, 222, 129, 0.2);
  box-shadow: 0 10px 25px rgba(38, 222, 129, 0.15);
}

/* 升级计时样式 - 黄色主题 */
.countdown-upgrade {
  background: linear-gradient(135deg, rgba(254, 211, 48, 0.15), rgba(254, 211, 48, 0.05));
  border: 1px solid rgba(254, 211, 48, 0.2);
  box-shadow: 0 10px 25px rgba(254, 211, 48, 0.15);
}

/* 站长计划倒计时样式 - 橙黄色主题 */
.countdown-webmaster {
  background: linear-gradient(135deg, rgba(255, 190, 118, 0.15), rgba(255, 190, 118, 0.05));
  border: 1px solid rgba(255, 190, 118, 0.2);
  box-shadow: 0 10px 25px rgba(255, 190, 118, 0.15);
}

.countdown-inner {
  padding: 15px;
  position: relative;
  z-index: 2;
}

/* 装饰元素 */
.countdown-decoration {
  position: absolute;
  border-radius: 50%;
  z-index: 1;
}

.countdown-decoration-1 {
  top: -15px;
  right: -15px;
  width: 80px;
  height: 80px;
  background: rgba(252, 92, 101, 0.1);
}

.countdown-decoration-2 {
  bottom: -20px;
  left: -20px;
  width: 100px;
  height: 100px;
  background: rgba(252, 92, 101, 0.05);
}

/* 倒计时标题 */
.countdown-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.countdown-label {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  margin-right: 10px;
  color: white;
  animation: pulse 1.5s infinite;
}

.countdown-urgent .countdown-label {
  background-color: #fc5c65;
}

.countdown-normal .countdown-label {
  background-color: #f08a5d;
}

.countdown-free .countdown-label {
  background-color: #26de81;
}

.countdown-upgrade .countdown-label {
  background-color: #fed330;
}

.countdown-webmaster .countdown-label {
  background-color: #ffbe76;
}

.countdown-title {
  color: #2d3436;
  font-size: 14px;
  font-weight: 600;
}

/* 倒计时数字区域 */
.countdown-timer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.countdown-unit {
  background: white;
  border-radius: 8px;
  padding: 8px 4px;
  min-width: 50px;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.countdown-urgent .countdown-unit {
  box-shadow: 0 10px 15px rgba(252, 92, 101, 0.15);
}

.countdown-normal .countdown-unit {
  box-shadow: 0 10px 15px rgba(240, 138, 93, 0.15);
}

.countdown-free .countdown-unit {
  box-shadow: 0 10px 15px rgba(38, 222, 129, 0.15);
}

.countdown-upgrade .countdown-unit {
  box-shadow: 0 10px 15px rgba(254, 211, 48, 0.15);
}

.countdown-webmaster .countdown-unit {
  box-shadow: 0 10px 15px rgba(255, 190, 118, 0.15);
}

.countdown-unit::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
  z-index: 0;
}

.countdown-number {
  font-weight: 700;
  font-size: 22px;
  display: block;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.countdown-urgent .countdown-number {
  color: #fc5c65;
}

.countdown-normal .countdown-number {
  color: #f08a5d;
}

.countdown-free .countdown-number {
  color: #26de81;
}

.countdown-upgrade .countdown-number {
  color: #fed330;
}

.countdown-webmaster .countdown-number {
  color: #ffbe76;
}

.countdown-text {
  font-size: 10px;
  color: #636e72;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.countdown-separator {
  font-weight: 700;
  font-size: 22px;
  margin: 0 2px;
  align-self: center;
}

.countdown-urgent .countdown-separator {
  color: #fc5c65;
}

.countdown-normal .countdown-separator {
  color: #f08a5d;
}

.countdown-free .countdown-separator {
  color: #26de81;
}

.countdown-upgrade .countdown-separator {
  color: #fed330;
}

.countdown-webmaster .countdown-separator {
  color: #ffbe76;
}

/* 毫秒单位 */
.countdown-milliseconds-wrap {
  border-radius: 8px;
  padding: 8px 4px;
  min-width: 70px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.countdown-urgent .countdown-milliseconds-wrap {
  background: linear-gradient(135deg, #fc5c65, #fd9644);
  box-shadow: 0 10px 15px rgba(252, 92, 101, 0.2);
}

.countdown-normal .countdown-milliseconds-wrap {
  background: linear-gradient(135deg, #f08a5d, #f9b384);
  box-shadow: 0 10px 15px rgba(240, 138, 93, 0.2);
}

.countdown-free .countdown-milliseconds-wrap {
  background: linear-gradient(135deg, #26de81, #20bf6b);
  box-shadow: 0 10px 15px rgba(38, 222, 129, 0.2);
}

.countdown-upgrade .countdown-milliseconds-wrap {
  background: linear-gradient(135deg, #fed330, #f7b731);
  box-shadow: 0 10px 15px rgba(254, 211, 48, 0.2);
}

.countdown-webmaster .countdown-milliseconds-wrap {
  background: linear-gradient(135deg, #ffbe76, #f0932b);
  box-shadow: 0 10px 15px rgba(255, 190, 118, 0.2);
}

.countdown-milliseconds {
  color: white;
  font-size: 18px;
  font-weight: 700;
  position: relative;
  z-index: 1;
  display: block;
  line-height: 1.2;
}

.countdown-milliseconds-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 10px;
  position: relative;
  z-index: 1;
}

/* 紧急消息 */
.countdown-message {
  text-align: center;
  font-weight: bold;
  margin-top: 10px;
  font-size: 14px;
  animation: blink 1s infinite;
}

.countdown-urgent .countdown-message {
  color: #fc5c65;
}

.countdown-normal .countdown-message {
  color: #f08a5d;
}

.countdown-free .countdown-message {
  color: #26de81;
}

.countdown-upgrade .countdown-message {
  color: #fed330;
}

.countdown-webmaster .countdown-message {
  color: #ffbe76;
}

/* 动画效果 */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* 限量提示样式 */
.limited-quantity {
  display: inline-block;
  background-color: #fc5c65;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  margin-right: 5px;
  animation: pulse 1.5s infinite;
}

/* 紧急购买按钮样式 */
.btn-urgent {
  background: linear-gradient(135deg, #fc5c65, #fd9644);
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 50px;
  font-weight: bold;
  box-shadow: 0 10px 20px rgba(252, 92, 101, 0.3);
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-urgent::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
  transform: rotate(0deg);
  transition: transform 0.5s;
}

.btn-urgent:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 25px rgba(252, 92, 101, 0.4);
}

.btn-urgent:hover::before {
  transform: rotate(180deg);
}

/* 闪烁价格标签 */
.flash-price {
  position: relative;
  display: inline-block;
  color: #fc5c65;
  font-size: 20px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(252, 92, 101, 0.1);
}

.flash-price::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(252, 92, 101, 0) 0%, rgba(252, 92, 101, 0.1) 50%, rgba(252, 92, 101, 0) 100%);
  animation: flash 2s infinite;
}

@keyframes flash {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
</style>

<!-- 在activity.html的</head>标签前添加以下内容 -->
<style id="dark-mode-styles">
/* 夜间模式过渡效果 */
body, .activity-card, .countdown-container, .countdown-unit, .countdown-milliseconds-wrap,
.countdown-number, .countdown-text, .countdown-message, .btn-urgent, .flash-price,
.limited-quantity, .activity-nav a, img {
transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, 
            box-shadow 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
}

/* 夜间模式下的活动卡片悬停效果 */
.dark .activity-card:hover {
transform: translateY(-5px);
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

/* 夜间模式下的倒计时容器 */
.dark .countdown-container {
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* 夜间模式下的按钮 */
.dark .activity-card a[href] {
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 夜间模式下的图片 */
.dark .activity-card img {
filter: brightness(0.85) contrast(0.9);
}

/* 夜间模式下的活动导航 */
.dark .activity-nav {
background-color: rgba(18, 18, 18, 0.5);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 夜间模式下的页面标题 */
.dark h1, .dark h2, .dark h3 {
color: #e0e0e0;
}

.dark p {
color: #aaaaaa;
}

/* 改进的夜间模式样式 */
.dark {
  background-color: #0a0a0a !important;
  color: #d0d0d0 !important;
}

/* 确保所有section都有正确的背景色 */
.dark body, .dark .container {
  background-color: #0a0a0a !important;
}

/* 卡片和容器背景 */
.dark .activity-card {
  background-color: #151515 !important;
  border-color: #333 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
}

/* 图片亮度调整 */
.dark img {
  filter: brightness(0.75) contrast(0.85) !important;
}

/* 按钮亮度调整 */
.dark .btn-urgent {
  background: linear-gradient(135deg, #c04040, #c06030) !important;
  box-shadow: 0 10px 20px rgba(192, 64, 64, 0.3) !important;
}

.dark .btn-urgent:hover {
  box-shadow: 0 15px 25px rgba(192, 64, 64, 0.4) !important;
}

/* 文本亮度调��� */
.dark h1, 
.dark h2, 
.dark h3, 
.dark h4, 
.dark h5, 
.dark h6 {
  color: #d0d0d0 !important;
}

.dark p, 
.dark li, 
.dark span:not(.countdown-number):not(.countdown-milliseconds) {
  color: #a0a0a0 !important;
}

/* 活动导航 */
.dark .activity-nav {
  background-color: #0a0a0a !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4) !important;
}

.dark .activity-nav a:not(.active) {
  background-color: #1a1a1a !important;
  color: #a0a0a0 !important;
}

/* 倒计时容器 */
.dark .countdown-container {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
}

.dark .countdown-urgent {
  background: linear-gradient(135deg, rgba(192, 64, 64, 0.15), rgba(192, 64, 64, 0.05)) !important;
  border: 1px solid rgba(192, 64, 64, 0.2) !important;
}

.dark .countdown-normal {
  background: linear-gradient(135deg, rgba(176, 106, 61, 0.15), rgba(176, 106, 61, 0.05)) !important;
  border: 1px solid rgba(176, 106, 61, 0.2) !important;
}

.dark .countdown-free {
  background: linear-gradient(135deg, rgba(32, 160, 96, 0.15), rgba(32, 160, 96, 0.05)) !important;
  border: 1px solid rgba(32, 160, 96, 0.2) !important;
}

.dark .countdown-upgrade {
  background: linear-gradient(135deg, rgba(192, 160, 32, 0.15), rgba(192, 160, 32, 0.05)) !important;
  border: 1px solid rgba(192, 160, 32, 0.2) !important;
}

.dark .countdown-webmaster {
  background: linear-gradient(135deg, rgba(192, 144, 80, 0.15), rgba(192, 144, 80, 0.05)) !important;
  border: 1px solid rgba(192, 144, 80, 0.2) !important;
}

/* 倒计时单位 */
.dark .countdown-unit {
  background-color: #151515 !important;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2) !important;
}

/* 倒计时毫秒 */
.dark .countdown-urgent .countdown-milliseconds-wrap {
  background: linear-gradient(135deg, #c04040, #c06030) !important;
}

.dark .countdown-normal .countdown-milliseconds-wrap {
  background: linear-gradient(135deg, #b06a3d, #c08060) !important;
}

.dark .countdown-free .countdown-milliseconds-wrap {
  background: linear-gradient(135deg, #20a060, #108040) !important;
}

.dark .countdown-upgrade .countdown-milliseconds-wrap {
  background: linear-gradient(135deg, #c0a020, #a08010) !important;
}

.dark .countdown-webmaster .countdown-milliseconds-wrap {
  background: linear-gradient(135deg, #c09050, #a07030) !important;
}

/* 闪烁价格标签 */
.dark .flash-price {
  color: #e05050 !important;
  background: rgba(192, 64, 64, 0.1) !important;
}

/* 限量提示 */
.dark .limited-quantity {
  background-color: #c04040 !important;
}

/* 移动端导航 */
.dark .mobile-nav {
  background-color: #0a0a0a !important;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4) !important;
  border-top: 1px solid rgba(50, 50, 50, 0.1) !important;
}
</style>


  <h1 style="text-align: center; margin-bottom: 30px; color: #f08a5d;">活动中心</h1>
  <p style="text-align: center; margin-bottom: 40px;">参与橘喵云举办的各类优惠活动，享受超值折扣和免费赠送，体验高品质IDC服务。</p>
  
  <!-- 活动分类导航 -->
  <div class="activity-nav">
  <a href="#all" class="active" data-category="all">全部活动</a>
  <a href="#discount" data-category="discount">限时折扣</a>
  <a href="#free" data-category="free">免费赠送</a>
  <a href="#upgrade" data-category="upgrade">配置升级</a>
  <a href="#events" data-category="events">线上线下活动</a>
  <a href="#webmaster" data-category="webmaster">站长计划</a>
</div>

  <!-- 热门活动概览 -->
  <div id="all">
    <h2 style="text-align: center; margin-bottom: 30px;">🔍 热门活动概览</h2>
    
    <!-- 限时折扣 -->
    <div id="discount" style="margin-bottom: 50px;" class="activity-section">
      <!-- 修改限时折扣区域的标题和描述 -->
      <h3 style="color: #fc5c65; margin-bottom: 20px;">🔥 限时特惠 - 即将结束</h3>
      <div class="activity-cards-container">
        <div class="activity-card" data-category="discount">
          <div style="position: relative;">
            <span style="position: absolute; top: 10px; right: 10px; background-color: #f08a5d; color: white; padding: 5px 10px; border-radius: 20px; font-size: 14px; font-weight: bold;">7折优惠</span>
            <img src="{$setting.web_view}/placeholder.svg?height=400&width=600" alt="高性能云服务器" style="width: 100%; height: 180px; object-fit: cover; border-radius: 8px;">
          </div>
          <h4 style="margin-top: 15px; margin-bottom: 10px;">高性能云服务器 SSD-1</h4>
          <p style="color: #636e72; font-size: 14px; margin-bottom: 15px;">4核8G内存 + 100G SSD + 5M带宽，适合中小型网站、应用部署和开发测试环境。</p>
          
<!-- 全新设计的倒计时组件 -->
<div class="countdown-container countdown-urgent">
  <div class="countdown-inner">
    <div class="countdown-decoration countdown-decoration-1"></div>
    <div class="countdown-decoration countdown-decoration-2"></div>
    
    <div class="countdown-header">
      <div class="countdown-label">限时抢购</div>
      <div class="countdown-title">活动即将结束，先到先得！</div>
    </div>
    
    <div class="countdown-timer-wrap" data-end-time="2025-04-30T23:59:59">
      <div class="countdown-unit">
        <span class="countdown-number countdown-days">00</span>
        <div class="countdown-text">天</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-hours">00</span>
        <div class="countdown-text">时</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-minutes">00</span>
        <div class="countdown-text">分</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-seconds">00</span>
        <div class="countdown-text">秒</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-milliseconds-wrap">
        <span class="countdown-milliseconds countdown-ms">000</span>
        <div class="countdown-milliseconds-text">毫秒</div>
      </div>
    </div>
    
    <div class="countdown-message">错过此次活动，再等一年！</div>
  </div>
</div>
          
          <!-- 修改第一个卡片的价格和按钮 -->
          <div style="margin-bottom: 15px;">
            <span style="text-decoration: line-through; color: #636e72; margin-right: 10px;">¥399/月</span>
            <span class="flash-price">¥279/月</span>
          </div>
          <div style="display: flex; justify-content: space-between; align-items: center;">
            <span style="color: #636e72; font-size: 14px;"><span class="limited-quantity">限量</span>仅剩5台</span>
            <a href="https://ogmiao.com/cart" class="btn-urgent">立即抢购</a>
          </div>
        </div>
        
        <div class="activity-card" data-category="discount">
          <div style="position: relative;">
            <span style="position: absolute; top: 10px; right: 10px; background-color: #f08a5d; color: white; padding: 5px 10px; border-radius: 20px; font-size: 14px; font-weight: bold;">6.5折</span>
            <img src="{$setting.web_view}/placeholder.svg?height=400&width=600" alt="企业级云服务器" style="width: 100%; height: 180px; object-fit: cover; border-radius: 8px;">
          </div>
          <h4 style="margin-top: 15px; margin-bottom: 10px;">企业级云服务器 ECS-2</h4>
          <p style="color: #636e72; font-size: 14px; margin-bottom: 15px;">8核16G内存 + 200G SSD + 10M带宽，适合企业网站、中型应用和数据处理。</p>
          
<!-- 全新设计的倒计时组件 -->
<div class="countdown-container countdown-urgent">
  <div class="countdown-inner">
    <div class="countdown-decoration countdown-decoration-1"></div>
    <div class="countdown-decoration countdown-decoration-2"></div>
    
    <div class="countdown-header">
      <div class="countdown-label">限时抢购</div>
      <div class="countdown-title">活动即将结束，先到先得！</div>
    </div>
    
    <div class="countdown-timer-wrap" data-end-time="2025-05-15T23:59:59">
      <div class="countdown-unit">
        <span class="countdown-number countdown-days">00</span>
        <div class="countdown-text">天</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-hours">00</span>
        <div class="countdown-text">时</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-minutes">00</span>
        <div class="countdown-text">分</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-seconds">00</span>
        <div class="countdown-text">秒</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-milliseconds-wrap">
        <span class="countdown-milliseconds countdown-ms">000</span>
        <div class="countdown-milliseconds-text">毫秒</div>
      </div>
    </div>
    
    <div class="countdown-message">库存告急，即将售罄！</div>
  </div>
</div>
          
          <!-- 修改第二个卡片的价格和按钮 -->
          <div style="margin-bottom: 15px;">
            <span style="text-decoration: line-through; color: #636e72; margin-right: 10px;">¥699/月</span>
            <span class="flash-price">¥454/月</span>
          </div>
          <div style="display: flex; justify-content: space-between; align-items: center;">
            <span style="color: #636e72; font-size: 14px;"><span class="limited-quantity">限量</span>仅剩3台</span>
            <a href="https://ogmiao.com/cart" class="btn-urgent">立即抢购</a>
          </div>
        </div>
        
        <div class="activity-card" data-category="discount">
          <div style="position: relative;">
            <span style="position: absolute; top: 10px; right: 10px; background-color: #f08a5d; color: white; padding: 5px 10px; border-radius: 20px; font-size: 14px; font-weight: bold;">8折优惠</span>
            <img src="{$setting.web_view}/placeholder.svg?height=400&width=600" alt="高防云服务器" style="width: 100%; height: 180px; object-fit: cover; border-radius: 8px;">
          </div>
          <h4 style="margin-top: 15px; margin-bottom: 10px;">高防云服务器 SEC-1</h4>
          <p style="color: #636e72; font-size: 14px; margin-bottom: 15px;">4核8G内存 + 100G SSD + 5M带宽 + 20G防护，适合游戏、金融等高防需求场景。</p>
          
<!-- 全新设计的倒计时组件 -->
<div class="countdown-container countdown-urgent">
  <div class="countdown-inner">
    <div class="countdown-decoration countdown-decoration-1"></div>
    <div class="countdown-decoration countdown-decoration-2"></div>
    
    <div class="countdown-header">
      <div class="countdown-label">限时抢购</div>
      <div class="countdown-title">活动即将结束，先到先得！</div>
    </div>
    
    <div class="countdown-timer-wrap" data-end-time="2025-05-10T23:59:59">
      <div class="countdown-unit">
        <span class="countdown-number countdown-days">00</span>
        <div class="countdown-text">天</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-hours">00</span>
        <div class="countdown-text">时</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-minutes">00</span>
        <div class="countdown-text">分</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-seconds">00</span>
        <div class="countdown-text">秒</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-milliseconds-wrap">
        <span class="countdown-milliseconds countdown-ms">000</span>
        <div class="countdown-milliseconds-text">毫秒</div>
      </div>
    </div>
    
    <div class="countdown-message">仅剩最后几台，手慢无！</div>
  </div>
</div>
          
          <!-- 修改第三个卡片的价格和按钮 -->
          <div style="margin-bottom: 15px;">
            <span style="text-decoration: line-through; color: #636e72; margin-right: 10px;">¥599/月</span>
            <span class="flash-price">¥479/月</span>
          </div>
          <div style="display: flex; justify-content: space-between; align-items: center;">
            <span style="color: #636e72; font-size: 14px;"><span class="limited-quantity">限量</span>最后2台</span>
            <a href="https://ogmiao.com/cart" class="btn-urgent">立即抢购</a>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 免费赠送 -->
    <div id="free" style="margin-bottom: 50px;" class="activity-section">
      <h3 style="color: #26de81; margin-bottom: 20px;">🎁 免费赠送</h3>
      <div class="activity-cards-container">
        <div class="activity-card" data-category="free">
          <div style="position: relative;">
            <span style="position: absolute; top: 10px; right: 10px; background-color: #26de81; color: white; padding: 5px 10px; border-radius: 20px; font-size: 14px; font-weight: bold;">免费赠送</span>
            <img src="{$setting.web_view}/placeholder.svg?height=400&width=600" alt="免费赠送服务器时长" style="width: 100%; height: 180px; object-fit: cover; border-radius: 8px;">
          </div>
          <h4 style="margin-top: 15px; margin-bottom: 10px;">新购云服务器赠送2个月</h4>
          <p style="color: #636e72; font-size: 14px; margin-bottom: 15px;">新购任意规格云服务器，一次性付费12个月，即可获赠2个月使用时长，相当于享受10个月的价格使用12个月。</p>
          
<!-- 全新设计的倒计时组件 - 免费赠送主题 -->
<div class="countdown-container countdown-free">
  <div class="countdown-inner">
    <div class="countdown-decoration countdown-decoration-1" style="background: rgba(38, 222, 129, 0.1);"></div>
    <div class="countdown-decoration countdown-decoration-2" style="background: rgba(38, 222, 129, 0.05);"></div>
    
    <div class="countdown-header">
      <div class="countdown-label">限时活动</div>
      <div class="countdown-title">活动倒计时，把握机会！</div>
    </div>
    
    <div class="countdown-timer-wrap" data-end-time="2025-04-30T23:59:59">
      <div class="countdown-unit">
        <span class="countdown-number countdown-days">00</span>
        <div class="countdown-text">天</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-hours">00</span>
        <div class="countdown-text">时</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-minutes">00</span>
        <div class="countdown-text">分</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-seconds">00</span>
        <div class="countdown-text">秒</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-milliseconds-wrap">
        <span class="countdown-milliseconds countdown-ms">000</span>
        <div class="countdown-milliseconds-text">毫秒</div>
      </div>
    </div>
    
    <div class="countdown-message">免费赠送，先到先得！</div>
  </div>
</div>
          
          <div style="display: flex; justify-content: space-between; align-items: center; background-color: rgba(38, 222, 129, 0.1); padding: 10px; border-radius: 8px; margin-bottom: 15px;">
            <h5 style="color: #26de81; margin-top: 0; margin-bottom: 5px; font-size: 14px;">获取条件：</h5>
            <p style="color: #636e72; font-size: 14px; margin: 0;">新用户首次购买任意规格云服务器，选择一次性付费12个月及以上，系统自动赠送2个月使用时长。</p>
          </div>
          <div style="display: flex; justify-content: space-between; align-items: center;">
            <span style="color: #636e72; font-size: 14px;">活动截止：2025-04-30</span>
            <a href="https://ogmiao.com/cart" style="background-color: #26de81; color: white; padding: 8px 15px; text-decoration: none; border-radius: 20px; font-weight: bold;">立即参与</a>
          </div>
        </div>

        <div class="activity-card" data-category="free">
          <div style="position: relative;">
            <span style="position: absolute; top: 10px; right: 10px; background-color: #26de81; color: white; padding: 5px 10px; border-radius: 20px; font-size: 14px; font-weight: bold;">免费赠送</span>
            <img src="{$setting.web_view}/placeholder.svg?height=400&width=600" alt="免费赠送域名" style="width: 100%; height: 180px; object-fit: cover; border-radius: 8px;">
          </div>
          <h4 style="margin-top: 15px; margin-bottom: 10px;">新购高配云服务器送域名</h4>
          <p style="color: #636e72; font-size: 14px; margin-bottom: 15px;">新购8核16G及以上规格云服务器，即可免费获赠一个.com域名（价值68元），有效期1年。</p>

<!-- 全新设计的倒计时组件 - 免费赠送主题 -->
<div class="countdown-container countdown-free">
  <div class="countdown-inner">
    <div class="countdown-decoration countdown-decoration-1" style="background: rgba(38, 222, 129, 0.1);"></div>
    <div class="countdown-decoration countdown-decoration-2" style="background: rgba(38, 222, 129, 0.05);"></div>
    
    <div class="countdown-header">
      <div class="countdown-label">限时活动</div>
      <div class="countdown-title">活动倒计时，把握机会！</div>
    </div>
    
    <div class="countdown-timer-wrap" data-end-time="2025-04-15T23:59:59">
      <div class="countdown-unit">
        <span class="countdown-number countdown-days">00</span>
        <div class="countdown-text">天</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-hours">00</span>
        <div class="countdown-text">时</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-minutes">00</span>
        <div class="countdown-text">分</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-seconds">00</span>
        <div class="countdown-text">秒</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-milliseconds-wrap">
        <span class="countdown-milliseconds countdown-ms">000</span>
        <div class="countdown-milliseconds-text">毫秒</div>
      </div>
    </div>
    
    <div class="countdown-message">免费域名，数量有限！</div>
  </div>
</div>
          
          <div style="background-color: rgba(38, 222, 129, 0.1); padding: 10px; border-radius: 8px; margin-bottom: 15px;">
            <h5 style="color: #26de81; margin-top: 0; margin-bottom: 5px; font-size: 14px;">获取条件：</h5>
            <p style="color: #636e72; font-size: 14px; margin: 0;">新购8核16G及以上规格云服务器，付费周期为1年及以上，下单后联系客服申请免费域名。</p>
          </div>
          <div style="display: flex; justify-content: space-between; align-items: center;">
            <span style="color: #636e72; font-size: 14px;">活动截止：2025-04-15</span>
            <a href="https://ogmiao.com/cart" style="background-color: #26de81; color: white; padding: 8px 15px; text-decoration: none; border-radius: 20px; font-weight: bold;">立即参与</a>
          </div>
        </div>

        <div class="activity-card" data-category="free">
          <div style="position: relative;">
            <span style="position: absolute; top: 10px; right: 10px; background-color: #26de81; color: white; padding: 5px 10px; border-radius: 20px; font-size: 14px; font-weight: bold;">免费赠送</span>
            <img src="{$setting.web_view}/placeholder.svg?height=400&width=600" alt="免费赠送SSL证书" style="width: 100%; height: 180px; object-fit: cover; border-radius: 8px;">
          </div>
          <h4 style="margin-top: 15px; margin-bottom: 10px;">购买云服务器送SSL证书</h4>
          <p style="color: #636e72; font-size: 14px; margin-bottom: 15px;">购买任意云服务器产品，即可免费获赠一个SSL证书（价值199元），有效期1年，保障您网站的安全。</p>

<!-- 全新设计的倒计时组件 - 免费赠送主题 -->
<div class="countdown-container countdown-free">
  <div class="countdown-inner">
    <div class="countdown-decoration countdown-decoration-1" style="background: rgba(38, 222, 129, 0.1);"></div>
    <div class="countdown-decoration countdown-decoration-2" style="background: rgba(38, 222, 129, 0.05);"></div>
    
    <div class="countdown-header">
      <div class="countdown-label">限时活动</div>
      <div class="countdown-title">活动倒计时，把握机会！</div>
    </div>
    
    <div class="countdown-timer-wrap" data-end-time="2025-05-20T23:59:59">
      <div class="countdown-unit">
        <span class="countdown-number countdown-days">00</span>
        <div class="countdown-text">天</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-hours">00</span>
        <div class="countdown-text">时</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-minutes">00</span>
        <div class="countdown-text">分</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-seconds">00</span>
        <div class="countdown-text">秒</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-milliseconds-wrap">
        <span class="countdown-milliseconds countdown-ms">000</span>
        <div class="countdown-milliseconds-text">毫秒</div>
      </div>
    </div>
    
    <div class="countdown-message">免费SSL证书，提升网站安全！</div>
  </div>
</div>

          
          <div style="background-color: rgba(38, 222, 129, 0.1); padding: 10px; border-radius: 8px; margin-bottom: 15px;">
            <h5 style="color: #26de81; margin-top: 0; margin-bottom: 5px; font-size: 14px;">获取条件：</h5>
            <p style="color: #636e72; font-size: 14px; margin: 0;">购买任意规格云服务器，付费周期为1年及以上，下单后联系客服申请免费SSL证书。</p>
          </div>
          <div style="display: flex; justify-content: space-between; align-items: center;">
            <span style="color: #636e72; font-size: 14px;">活动截止：2025-05-20</span>
            <a href="https://ogmiao.com/cart" style="background-color: #26de81; color: white; padding: 8px 15px; text-decoration: none; border-radius: 20px; font-weight: bold;">立即参与</a>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 配置升级 -->
    <div id="upgrade" style="margin-bottom: 50px;" class="activity-section">
      <h3 style="color: #fed330; margin-bottom: 20px;">⚡ 配置升级</h3>
      <div class="activity-cards-container">
        <div class="activity-card" data-category="upgrade">
          <img src="{$setting.web_view}/placeholder.svg?height=400&width=600" alt="内存免费升级" style="width: 100%; height: 180px; object-fit: cover; border-radius: 8px;">
          <h4 style="margin-top: 15px; margin-bottom: 10px;">云服务器内存免费升级</h4>
          <p style="color: #636e72; font-size: 14px; margin-bottom: 15px;">购买指定规格云服务器，享受内存免费升级优惠，性能提升50%，价格不变。</p>
          
<!-- 全新设计的倒计时组件 - 配置升级主题 -->
<div class="countdown-container countdown-upgrade">
  <div class="countdown-inner">
    <div class="countdown-decoration countdown-decoration-1" style="background: rgba(254, 211, 48, 0.1);"></div>
    <div class="countdown-decoration countdown-decoration-2" style="background: rgba(254, 211, 48, 0.05);"></div>
    
    <div class="countdown-header">
      <div class="countdown-label">限时升级</div>
      <div class="countdown-title">升级倒计时，把握机会！</div>
    </div>
    
    <div class="countdown-timer-wrap" data-end-time="2025-04-30T23:59:59">
      <div class="countdown-unit">
        <span class="countdown-number countdown-days">00</span>
        <div class="countdown-text">天</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-hours">00</span>
        <div class="countdown-text">时</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-minutes">00</span>
        <div class="countdown-text">分</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-seconds">00</span>
        <div class="countdown-text">秒</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-milliseconds-wrap">
        <span class="countdown-milliseconds countdown-ms">000</span>
        <div class="countdown-milliseconds-text">毫秒</div>
      </div>
    </div>
    
    <div class="countdown-message">免费升级，性能提升50%！</div>
  </div>
</div>
          
          <div style="display: flex; justify-content: space-between; align-items: center; background-color: rgba(254, 211, 48, 0.1); padding: 10px; border-radius: 8px; margin-bottom: 15px;">
            <div style="text-align: center;">
              <div style="color: #636e72; font-size: 12px; margin-bottom: 5px;">升级前</div>
              <div style="font-weight: bold;">8GB内存</div>
            </div>
            <div style="font-size: 20px; color: #fed330;">→</div>
            <div style="text-align: center;">
              <div style="color: #636e72; font-size: 12px; margin-bottom: 5px;">升级后</div>
              <div style="font-weight: bold;">12GB内存</div>
            </div>
          </div>
          <div style="display: flex; justify-content: space-between; align-items: center;">
            <span style="color: #636e72; font-size: 14px;">活动截止：2025-04-30</span>
            <a href="https://ogmiao.com/cart" style="background-color: #fed330; color: white; padding: 8px 15px; text-decoration: none; border-radius: 20px; font-weight: bold;">立即升级</a>
          </div>
        </div>
        
        <div class="activity-card" data-category="upgrade">
          <img src="{$setting.web_view}/placeholder.svg?height=400&width=600" alt="带宽免费升级" style="width: 100%; height: 180px; object-fit: cover; border-radius: 8px;">
          <h4 style="margin-top: 15px; margin-bottom: 10px;">云服务器带宽免费升级</h4>
          <p style="color: #636e72; font-size: 14px; margin-bottom: 15px;">购买指定规格云服务器，享受带宽免费升级优惠，网络速度提升一倍，价格不变。</p>
          
<!-- 全新设计的倒计时组件 - 配置升级主题 -->
<div class="countdown-container countdown-upgrade">
  <div class="countdown-inner">
    <div class="countdown-decoration countdown-decoration-1" style="background: rgba(254, 211, 48, 0.1);"></div>
    <div class="countdown-decoration countdown-decoration-2" style="background: rgba(254, 211, 48, 0.05);"></div>
    
    <div class="countdown-header">
      <div class="countdown-label">限时升级</div>
      <div class="countdown-title">升级倒计时，把握机会！</div>
    </div>
    
    <div class="countdown-timer-wrap" data-end-time="2025-05-15T23:59:59">
      <div class="countdown-unit">
        <span class="countdown-number countdown-days">00</span>
        <div class="countdown-text">天</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-hours">00</span>
        <div class="countdown-text">时</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-minutes">00</span>
        <div class="countdown-text">分</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-seconds">00</span>
        <div class="countdown-text">秒</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-milliseconds-wrap">
        <span class="countdown-milliseconds countdown-ms">000</span>
        <div class="countdown-milliseconds-text">毫秒</div>
      </div>
    </div>
    
    <div class="countdown-message">免费升级，网速提升一倍！</div>
  </div>
</div>
          
          <div style="display: flex; justify-content: space-between; align-items: center; background-color: rgba(254, 211, 48, 0.1); padding: 10px; border-radius: 8px; margin-bottom: 15px;">
            <div style="text-align: center;">
              <div style="color: #636e72; font-size: 12px; margin-bottom: 5px;">升级前</div>
              <div style="font-weight: bold;">5Mbps带宽</div>
            </div>
            <div style="font-size: 20px; color: #fed330;">→</div>
            <div style="text-align: center;">
              <div style="color: #636e72; font-size: 12px; margin-bottom: 5px;">升级后</div>
              <div style="font-weight: bold;">10Mbps带宽</div>
            </div>
          </div>
          <div style="display: flex; justify-content: space-between; align-items: center;">
            <span style="color: #636e72; font-size: 14px;">活动截止：2025-05-15</span>
            <a href="https://ogmiao.com/cart" style="background-color: #fed330; color: white; padding: 8px 15px; text-decoration: none; border-radius: 20px; font-weight: bold;">立即升级</a>
          </div>
        </div>
        
        <div class="activity-card" data-category="upgrade">
          <img src="{$setting.web_view}/placeholder.svg?height=400&width=600" alt="硬盘免费升级" style="width: 100%; height: 180px; object-fit: cover; border-radius: 8px;">
          <h4 style="margin-top: 15px; margin-bottom: 10px;">云服务器硬盘免费升级</h4>
          <p style="color: #636e72; font-size: 14px; margin-bottom: 15px;">购买指定规格云服务器，享受硬盘免费升级优惠，存储空间翻倍，价格不变。</p>
          
<!-- 全新设计的倒计时组件 - 配置升级主题 -->
<div class="countdown-container countdown-upgrade">
  <div class="countdown-inner">
    <div class="countdown-decoration countdown-decoration-1" style="background: rgba(254, 211, 48, 0.1);"></div>
    <div class="countdown-decoration countdown-decoration-2" style="background: rgba(254, 211, 48, 0.05);"></div>
    
    <div class="countdown-header">
      <div class="countdown-label">限时升级</div>
      <div class="countdown-title">升级倒计时，把握机会！</div>
    </div>
    
    <div class="countdown-timer-wrap" data-end-time="2025-05-10T23:59:59">
      <div class="countdown-unit">
        <span class="countdown-number countdown-days">00</span>
        <div class="countdown-text">天</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-hours">00</span>
        <div class="countdown-text">时</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-minutes">00</span>
        <div class="countdown-text">分</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-seconds">00</span>
        <div class="countdown-text">秒</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-milliseconds-wrap">
        <span class="countdown-milliseconds countdown-ms">000</span>
        <div class="countdown-milliseconds-text">毫秒</div>
      </div>
    </div>
    
    <div class="countdown-message">免费升级，存储空间翻倍！</div>
  </div>
</div>
          
          <div style="display: flex; justify-content: space-between; align-items: center; background-color: rgba(254, 211, 48, 0.1); padding: 10px; border-radius: 8px; margin-bottom: 15px;">
            <div style="text-align: center;">
              <div style="color: #636e72; font-size: 12px; margin-bottom: 5px;">升级前</div>
              <div style="font-weight: bold;">100GB SSD</div>
            </div>
            <div style="font-size: 20px; color: #fed330;">→</div>
            <div style="text-align: center;">
              <div style="color: #636e72; font-size: 12px; margin-bottom: 5px;">升级后</div>
              <div style="font-weight: bold;">200GB SSD</div>
            </div>
          </div>
          <div style="display: flex; justify-content: space-between; align-items: center;">
            <span style="color: #636e72; font-size: 14px;">活动截止：2025-05-10</span>
            <a href="https://ogmiao.com/cart" style="background-color: #fed330; color: white; padding: 8px 15px; text-decoration: none; border-radius: 20px; font-weight: bold;">立即升级</a>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 线上线下活动 -->
    <div id="events" style="margin-bottom: 50px;" class="activity-section">
      <h3 style="color: #f08a5d; margin-bottom: 20px;">📅 线上线下活动</h3>
      <div class="activity-cards-container">
        <div class="activity-card" data-category="events">
          <div style="position: relative;">
            <span style="position: absolute; top: 10px; right: 10px; background-color: #f08a5d; color: white; padding: 5px 10px; border-radius: 20px; font-size: 14px; font-weight: bold;">线下活动</span>
            <img src="{$setting.web_view}/placeholder.svg?height=400&width=600" alt="云计算技术交流会" style="width: 100%; height: 180px; object-fit: cover; border-radius: 8px;">
          </div>
          <h4 style="margin-top: 15px; margin-bottom: 10px;">2025云计算技术交流会</h4>
          <div style="display: flex; gap: 15px; margin-bottom: 10px;">
            <span style="color: #636e72; font-size: 14px;">📅 2025-04-15</span>
            <span style="color: #636e72; font-size: 14px;">📍 北京国际会议中心</span>
          </div>
          <p style="color: #636e72; font-size: 14px; margin-bottom: 15px;">探讨云计算最新技术趋势、应用场景及未来发展方向，邀请行业专家分享实践经验。</p>
          
<!-- 全新设计的倒计时组件 - 活动主题 -->
<div class="countdown-container countdown-normal">
  <div class="countdown-inner">
    <div class="countdown-decoration countdown-decoration-1" style="background: rgba(240, 138, 93, 0.1);"></div>
    <div class="countdown-decoration countdown-decoration-2" style="background: rgba(240, 138, 93, 0.05);"></div>
    
    <div class="countdown-header">
      <div class="countdown-label">即将开始</div>
      <div class="countdown-title">活动开始倒计时</div>
    </div>
    
    <div class="countdown-timer-wrap" data-end-time="2025-04-15T14:00:00">
      <div class="countdown-unit">
        <span class="countdown-number countdown-days">00</span>
        <div class="countdown-text">天</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-hours">00</span>
        <div class="countdown-text">时</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-minutes">00</span>
        <div class="countdown-text">分</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-seconds">00</span>
        <div class="countdown-text">秒</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-milliseconds-wrap">
        <span class="countdown-milliseconds countdown-ms">000</span>
        <div class="countdown-milliseconds-text">毫秒</div>
      </div>
    </div>
    
    <div class="countdown-message">名额有限，抓紧报名！</div>
  </div>
</div>
          
          <div style="display: flex; justify-content: space-between; align-items: center;">
            <span style="background-color: rgba(38, 222, 129, 0.1); color: #26de81; padding: 5px 10px; border-radius: 20px; font-size: 14px;">报名中</span>
            <a href="{$setting.web_view}/events/cloud-meetup.html" style="background-color: #f08a5d; color: white; padding: 8px 15px; text-decoration: none; border-radius: 20px; font-weight: bold;">立即报名</a>
          </div>
        </div>
        
        <div class="activity-card" data-category="events">
          <div style="position: relative;">
            <span style="position: absolute; top: 10px; right: 10px; background-color: #26de81; color: white; padding: 5px 10px; border-radius: 20px; font-size: 14px; font-weight: bold;">线上活动</span>
            <img src="{$setting.web_view}/placeholder.svg?height=400&width=600" alt="云服务器性能优化直播" style="width: 100%; height: 180px; object-fit: cover; border-radius: 8px;">
          </div>
          <h4 style="margin-top: 15px; margin-bottom: 10px;">云服务器性能优化技术直播</h4>
          <div style="display: flex; gap: 15px; margin-bottom: 10px;">
            <span style="color: #636e72; font-size: 14px;">📅 2025-04-18</span>
            <span style="color: #636e72; font-size: 14px;">📺 橘喵云官方B站</span>
          </div>
          <p style="color: #636e72; font-size: 14px; margin-bottom: 15px;">橘喵云技术专家在线分享云服务器性能优化技巧，包括系统调优、网络优化、数据库优化等内容。</p>
          
<!-- 全新设计的倒计时组件 - 免费赠送主题 -->
<div class="countdown-container countdown-free">
  <div class="countdown-inner">
    <div class="countdown-decoration countdown-decoration-1" style="background: rgba(38, 222, 129, 0.1);"></div>
    <div class="countdown-decoration countdown-decoration-2" style="background: rgba(38, 222, 129, 0.05);"></div>
    
    <div class="countdown-header">
      <div class="countdown-label">即将开始</div>
      <div class="countdown-title">活动开始倒计时</div>
    </div>
    
    <div class="countdown-timer-wrap" data-end-time="2025-04-18T19:30:00">
      <div class="countdown-unit">
        <span class="countdown-number countdown-days">00</span>
        <div class="countdown-text">天</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-hours">00</span>
        <div class="countdown-text">时</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-minutes">00</span>
        <div class="countdown-text">分</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-seconds">00</span>
        <div class="countdown-text">秒</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-milliseconds-wrap">
        <span class="countdown-milliseconds countdown-ms">000</span>
        <div class="countdown-milliseconds-text">毫秒</div>
      </div>
    </div>
    
    <div class="countdown-message">免费技术直播，不容错过！</div>
  </div>
</div>
          
          <div style="display: flex; justify-content: space-between; align-items: center;">
            <span style="background-color: rgba(254, 211, 48, 0.1); color: #fed330; padding: 5px 10px; border-radius: 20px; font-size: 14px;">即将开始</span>
            <a href="{$setting.web_view}/events/live-optimization.html" style="background-color: #26de81; color: white; padding: 8px 15px; text-decoration: none; border-radius: 20px; font-weight: bold;">预约提醒</a>
          </div>
        </div>
        
        <div class="activity-card" data-category="events">
          <div style="position: relative;">
            <span style="position: absolute; top: 10px; right: 10px; background-color: #f08a5d; color: white; padding: 5px 10px; border-radius: 20px; font-size: 14px; font-weight: bold;">线下活动</span>
            <img src="{$setting.web_view}/placeholder.svg?height=400&width=600" alt="IDC产业峰会" style="width: 100%; height: 180px; object-fit: cover; border-radius: 8px;">
          </div>
          <h4 style="margin-top: 15px; margin-bottom: 10px;">2025 IDC产业峰会</h4>
          <div style="display: flex; gap: 15px; margin-bottom: 10px;">
            <span style="color: #636e72; font-size: 14px;">📅 2025-05-20</span>
            <span style="color: #636e72; font-size: 14px;">📍 上海国际会展中心</span>
          </div>
          <p style="color: #636e72; font-size: 14px; margin-bottom: 15px;">聚焦IDC产业发展趋势，探讨数据中心建设、运营和创新，与行业领袖共同探索IDC未来发展方向。</p>
          
<!-- 全新设计的倒计时组件 - 活动主题 -->
<div class="countdown-container countdown-normal">
  <div class="countdown-inner">
    <div class="countdown-decoration countdown-decoration-1" style="background: rgba(240, 138, 93, 0.1);"></div>
    <div class="countdown-decoration countdown-decoration-2" style="background: rgba(240, 138, 93, 0.05);"></div>
    
    <div class="countdown-header">
      <div class="countdown-label">即将开始</div>
      <div class="countdown-title">活动开始倒计时</div>
    </div>
    
    <div class="countdown-timer-wrap" data-end-time="2025-05-20T09:00:00">
      <div class="countdown-unit">
        <span class="countdown-number countdown-days">00</span>
        <div class="countdown-text">天</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-hours">00</span>
        <div class="countdown-text">时</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-minutes">00</span>
        <div class="countdown-text">分</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-seconds">00</span>
        <div class="countdown-text">秒</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-milliseconds-wrap">
        <span class="countdown-milliseconds countdown-ms">000</span>
        <div class="countdown-milliseconds-text">毫秒</div>
      </div>
    </div>
    
    <div class="countdown-message">行业盛会，名额有限！</div>
  </div>
</div>
          
          <div style="display: flex; justify-content: space-between; align-items: center;">
            <span style="background-color: rgba(38, 222, 129, 0.1); color: #26de81; padding: 5px 10px; border-radius: 20px; font-size: 14px;">报名中</span>
            <a href="{$setting.web_view}/events/idc-summit.html" style="background-color: #f08a5d; color: white; padding: 8px 15px; text-decoration: none; border-radius: 20px; font-weight: bold;">立即报名</a>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 站长计划 -->
    <div id="webmaster" style="margin-bottom: 50px;" class="activity-section">
      <h3 style="color: #ffbe76; margin-bottom: 20px;">🚀 站长计划</h3>
      <div class="activity-cards-container">
        <div class="activity-card" data-category="webmaster">
          <div style="position: relative;">
            <span style="position: absolute; top: 10px; right: 10px; background-color: #ffbe76; color: white; padding: 5px 10px; border-radius: 20px; font-size: 14px; font-weight: bold;">站长专享</span>
            <img src="{$setting.web_view}/placeholder.svg?height=400&width=600" alt="站长专享服务器" style="width: 100%; height: 180px; object-fit: cover; border-radius: 8px;">
          </div>
          <h4 style="margin-top: 15px; margin-bottom: 10px;">站长专享云服务器套餐</h4>
          <p style="color: #636e72; font-size: 14px; margin-bottom: 15px;">为站长量身定制的云服务器套餐，高性能配置，超低价格，助力站长轻松建站和运营。</p>
          
<!-- 全新设计的倒计时组件 - 站长计划主题 -->
<div class="countdown-container countdown-webmaster">
  <div class="countdown-inner">
    <div class="countdown-decoration countdown-decoration-1" style="background: rgba(255, 190, 118, 0.1);"></div>
    <div class="countdown-decoration countdown-decoration-2" style="background: rgba(255, 190, 118, 0.05);"></div>
    
    <div class="countdown-header">
      <div class="countdown-label">限时专享</div>
      <div class="countdown-title">专属优惠倒计时</div>
    </div>
    
    <div class="countdown-timer-wrap" data-end-time="2025-06-30T23:59:59">
      <div class="countdown-unit">
        <span class="countdown-number countdown-days">00</span>
        <div class="countdown-text">天</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-hours">00</span>
        <div class="countdown-text">时</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-minutes">00</span>
        <div class="countdown-text">分</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-seconds">00</span>
        <div class="countdown-text">秒</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-milliseconds-wrap">
        <span class="countdown-milliseconds countdown-ms">000</span>
        <div class="countdown-milliseconds-text">毫秒</div>
      </div>
    </div>
    
    <div class="countdown-message">站长专享，超值优惠！</div>
  </div>
</div>
          
          <div style="margin-bottom: 15px;">
            <div style="display: flex; align-items: flex-start; margin-bottom: 8px;">
              <span style="color: #ffbe76; margin-right: 8px; font-weight: bold;">✓</span>
              <span style="color: #636e72; font-size: 14px;">2核4G内存 + 80G SSD + 5M带宽，仅需99元/月</span>
            </div>
            <div style="display: flex; align-items: flex-start; margin-bottom: 8px;">
              <span style="color: #ffbe76; margin-right: 8px; font-weight: bold;">✓</span>
              <span style="color: #636e72; font-size: 14px;">免费提供网站备案服务</span>
            </div>
            <div style="display: flex; align-items: flex-start; margin-bottom: 8px;">
              <span style="color: #ffbe76; margin-right: 8px; font-weight: bold;">✓</span>
              <span style="color: #636e72; font-size: 14px;">赠送3个月DDoS防护服务</span>
            </div>
            <div style="display: flex; align-items: flex-start;">
              <span style="color: #ffbe76; margin-right: 8px; font-weight: bold;">✓</span>
              <span style="color: #636e72; font-size: 14px;">7*24小时技术支持</span>
            </div>
          </div>
          <div style="display: flex; justify-content: space-between; align-items: center;">
            <span style="color: #636e72; font-size: 14px;">需提供站长身份证明</span>
            <a href="{$setting.web_view}/webmaster/server.html" style="background-color: #ffbe76; color: white; padding: 8px 15px; text-decoration: none; border-radius: 20px; font-weight: bold;">立即申请</a>
          </div>
        </div>
        
        <div class="activity-card" data-category="webmaster">
          <div style="position: relative;">
            <span style="position: absolute; top: 10px; right: 10px; background-color: #ffbe76; color: white; padding: 5px 10px; border-radius: 20px; font-size: 14px; font-weight: bold;">站长专享</span>
            <img src="{$setting.web_view}/placeholder.svg?height=400&width=600" alt="站长建站套餐" style="width: 100%; height: 180px; object-fit: cover; border-radius: 8px;">
          </div>
          <h4 style="margin-top: 15px; margin-bottom: 10px;">站长一键建站套餐</h4>
          <p style="color: #636e72; font-size: 14px; margin-bottom: 15px;">包含云服务器、域名、SSL证书、建站系统，一站式解决站长建站需求，快速上线网站。</p>
          
<!-- 全新设计的倒计时组件 - 站长计划主题 -->
<div class="countdown-container countdown-webmaster">
  <div class="countdown-inner">
    <div class="countdown-decoration countdown-decoration-1" style="background: rgba(255, 190, 118, 0.1);"></div>
    <div class="countdown-decoration countdown-decoration-2" style="background: rgba(255, 190, 118, 0.05);"></div>
    
    <div class="countdown-header">
      <div class="countdown-label">限时专享</div>
      <div class="countdown-title">专属优惠倒计时</div>
    </div>
    
    <div class="countdown-timer-wrap" data-end-time="2025-05-31T23:59:59">
      <div class="countdown-unit">
        <span class="countdown-number countdown-days">00</span>
        <div class="countdown-text">天</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-hours">00</span>
        <div class="countdown-text">时</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-minutes">00</span>
        <div class="countdown-text">分</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-seconds">00</span>
        <div class="countdown-text">秒</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-milliseconds-wrap">
        <span class="countdown-milliseconds countdown-ms">000</span>
        <div class="countdown-milliseconds-text">毫秒</div>
      </div>
    </div>
    
    <div class="countdown-message">一键建站，快速上线！</div>
  </div>
</div>
          
          <div style="margin-bottom: 15px;">
            <div style="display: flex; align-items: flex-start; margin-bottom: 8px;">
              <span style="color: #ffbe76; margin-right: 8px; font-weight: bold;">✓</span>
              <span style="color: #636e72; font-size: 14px;">2核4G云服务器 + .com域名 + SSL证书</span>
            </div>
            <div style="display: flex; align-items: flex-start; margin-bottom: 8px;">
              <span style="color: #ffbe76; margin-right: 8px; font-weight: bold;">✓</span>
              <span style="color: #636e72; font-size: 14px;">WordPress/Discuz/帝国CMS等多种建站系统</span>
            </div>
            <div style="display: flex; align-items: flex-start; margin-bottom: 8px;">
              <span style="color: #ffbe76; margin-right: 8px; font-weight: bold;">✓</span>
              <span style="color: #636e72; font-size: 14px;">专业技术人员协助建站</span>
            </div>
            <div style="display: flex; align-items: flex-start;">
              <span style="color: #ffbe76; margin-right: 8px; font-weight: bold;">✓</span>
              <span style="color: #636e72; font-size: 14px;">赠送SEO优化指导</span>
            </div>
          </div>
          <div style="display: flex; justify-content: space-between; align-items: center;">
            <span style="color: #636e72; font-size: 14px;">首年仅需999元</span>
            <a href="{$setting.web_view}/webmaster/website.html" style="background-color: #ffbe76; color: white; padding: 8px 15px; text-decoration: none; border-radius: 20px; font-weight: bold;">立即购买</a>
          </div>
        </div>
        
        <div class="activity-card" data-category="webmaster">
          <div style="position: relative;">
            <span style="position: absolute; top: 10px; right: 10px; background-color: #ffbe76; color: white; padding: 5px 10px; border-radius: 20px; font-size: 14px; font-weight: bold;">站长专享</span>
            <img src="{$setting.web_view}/placeholder.svg?height=400&width=600" alt="站长推广计划" style="width: 100%; height: 180px; object-fit: cover; border-radius: 8px;">
          </div>
          <h4 style="margin-top: 15px; margin-bottom: 10px;">站长推广返佣计划</h4>
          <p style="color: #636e72; font-size: 14px; margin-bottom: 15px;">成为橘喵云推广合作伙伴，获取专属推广链接，每成功推广一单可获得高额返佣。</p>
          
<!-- 全新设计的倒计时组件 - 站长计划主题 -->
<div class="countdown-container countdown-webmaster">
  <div class="countdown-inner">
    <div class="countdown-decoration countdown-decoration-1" style="background: rgba(255, 190, 118, 0.1);"></div>
    <div class="countdown-decoration countdown-decoration-2" style="background: rgba(255, 190, 118, 0.05);"></div>
    
    <div class="countdown-header">
      <div class="countdown-label">限时专享</div>
      <div class="countdown-title">专属优惠倒计时</div>
    </div>
    
    <div class="countdown-timer-wrap" data-end-time="2025-12-31T23:59:59">
      <div class="countdown-unit">
        <span class="countdown-number countdown-days">00</span>
        <div class="countdown-text">天</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-hours">00</span>
        <div class="countdown-text">时</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-minutes">00</span>
        <div class="countdown-text">分</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-unit">
        <span class="countdown-number countdown-seconds">00</span>
        <div class="countdown-text">秒</div>
      </div>
      <div class="countdown-separator">:</div>
      <div class="countdown-milliseconds-wrap">
        <span class="countdown-milliseconds countdown-ms">000</span>
        <div class="countdown-milliseconds-text">毫秒</div>
      </div>
    </div>
    
    <div class="countdown-message">高额返佣，合作共赢！</div>
  </div>
</div>
          
          <div style="margin-bottom: 15px;">
            <div style="display: flex; align-items: flex-start; margin-bottom: 8px;">
              <span style="color: #ffbe76; margin-right: 8px; font-weight: bold;">✓</span>
              <span style="color: #636e72; font-size: 14px;">首单返佣比例高达30%</span>
            </div>
            <div style="display: flex; align-items: flex-start; margin-bottom: 8px;">
              <span style="color: #ffbe76; margin-right: 8px; font-weight: bold;">✓</span>
              <span style="color: #636e72; font-size: 14px;">老带新额外奖励10%</span>
            </div>
            <div style="display: flex; align-items: flex-start; margin-bottom: 8px;">
              <span style="color: #ffbe76; margin-right: 8px; font-weight: bold;">✓</span>
              <span style="color: #636e72; font-size: 14px;">提供专业推广物料</span>
            </div>
            <div style="display: flex; align-items: flex-start;">
              <span style="color: #ffbe76; margin-right: 8px; font-weight: bold;">✓</span>
              <span style="color: #636e72; font-size: 14px;">每月固定结算，无最低提现额度</span>
            </div>
          </div>
          <div style="display: flex; justify-content: space-between; align-items: center;">
            <span style="color: #636e72; font-size: 14px;">需提供站长身份证明</span>
            <a href="{$setting.web_view}/affiliate.html" style="background-color: #ffbe76; color: white; padding: 8px 15px; text-decoration: none; border-radius: 20px; font-weight: bold;">立即加入</a>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<!-- 更新的倒计时脚本，支持毫秒显示 -->
<script>
document.title = "橘喵云 | 活动中心";
document.addEventListener("DOMContentLoaded", function() {
  // 导航标签点击事件 - 改进的筛选功能
  const navLinks = document.querySelectorAll(".activity-nav a");
  const activitySections = document.querySelectorAll(".activity-section");
  const activityCards = document.querySelectorAll(".activity-card");

  navLinks.forEach(link => {
    link.addEventListener("click", function(e) {
      e.preventDefault();
      
      // 移除所有导航标签的活跃样式
      navLinks.forEach(navLink => {
        navLink.classList.remove("active");
      });
      
      // 添加当前点击标签的活跃样式
      this.classList.add("active");
      
      // 获取选中的分类
      const selectedCategory = this.getAttribute("data-category");
      
      if (selectedCategory === "all") {
        // 显示所有活动
        activitySections.forEach(section => {
          section.style.display = "block";
        });
        activityCards.forEach(card => {
          card.style.display = "block";
        });
      } else {
        // 显示对应分类的活动
        activitySections.forEach(section => {
          if (section.id === selectedCategory) {
            section.style.display = "block";
          } else {
            section.style.display = "none";
          }
        });
        
        // 如果在"全部活动"视图中，还需要筛选卡片
        if (document.querySelector(".activity-nav a[data-category='all']").classList.contains("active")) {
          activityCards.forEach(card => {
            if (card.getAttribute("data-category") === selectedCategory) {
              card.style.display = "block";
            } else {
              card.style.display = "none";
            }
          });
        }
      }
      
      // 滚动到目标位置
      const targetId = this.getAttribute("href").substring(1);
      const targetElement = document.getElementById(targetId);
      if (targetElement) {
        window.scrollTo({
          top: targetElement.offsetTop - 100,
          behavior: "smooth"
        });
      }
      
      // 在移动设备上，确保当前活动标签在视图中居中
      if (window.innerWidth <= 768) {
        setTimeout(() => {
          const rect = this.getBoundingClientRect();
          const navRect = document.querySelector(".activity-nav").getBoundingClientRect();
          const offset = rect.left + rect.width / 2 - navRect.left - navRect.width / 2;
          document.querySelector(".activity-nav").scrollLeft += offset;
        }, 10);
      }
    });
  });

  // 直接在这里实现倒计时功能
  function startCountdowns() {
    console.log("开始初始化倒计时...");
    const countdownTimers = document.querySelectorAll(".countdown-timer-wrap");
    console.log(`找到 ${countdownTimers.length} 个倒计时器`);

    if (countdownTimers.length === 0) return;

    // 更新所有倒计时
    function updateAllCountdowns() {
      countdownTimers.forEach(updateCountdown);
    }

    // 更新单个倒计时
    function updateCountdown(timer) {
      // 获取结束时间
      const endTimeStr = timer.getAttribute("data-end-time");
      if (!endTimeStr) {
        console.warn("倒计时没有结束时间:", timer);
        return;
      }

      const endTime = new Date(endTimeStr).getTime();
      const now = new Date().getTime();
      const distance = endTime - now;

      // 获取显示元素
      const daysEl = timer.querySelector(".countdown-days");
      const hoursEl = timer.querySelector(".countdown-hours");
      const minutesEl = timer.querySelector(".countdown-minutes");
      const secondsEl = timer.querySelector(".countdown-seconds");
      const msEl = timer.querySelector(".countdown-ms");

      // 检查元素是否存在
      if (!daysEl || !hoursEl || !minutesEl || !secondsEl) {
        console.warn("计时元素不完整:", timer);
        return;
      }

      // 如果时间已过
      if (distance < 0) {
        daysEl.textContent = "00";
        hoursEl.textContent = "00";
        minutesEl.textContent = "00";
        secondsEl.textContent = "00";
        if (msEl) msEl.textContent = "000";

        // 添加已结束样式
        const container = timer.closest(".countdown-container");
        if (container) {
          container.style.opacity = "0.7";

          // 更新消息
          const messageEl = container.querySelector(".countdown-message");
          if (messageEl) {
            messageEl.textContent = "活动已结束";
            messageEl.style.animation = "none";
            messageEl.style.color = document.body.classList.contains("dark") ? "#aaaaaa" : "#aaaaaa";
          }
        }
        return;
      }

      // 计算时间
      const days = Math.floor(distance / (1000 * 60 * 60 * 24));
      const hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
      const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
      const seconds = Math.floor((distance % (1000 * 60)) / 1000);
      const milliseconds = Math.floor(distance % 1000);

      // 更新显示
      daysEl.textContent = days < 10 ? `0${days}` : days;
      hoursEl.textContent = hours < 10 ? `0${hours}` : hours;
      minutesEl.textContent = minutes < 10 ? `0${minutes}` : minutes;
      secondsEl.textContent = seconds < 10 ? `0${seconds}` : seconds;

      // 更新毫秒
      if (msEl) {
        msEl.textContent = milliseconds < 10 ? `00${milliseconds}` : milliseconds < 100 ? `0${milliseconds}` : milliseconds;
      }

      // 当剩余时间少于24小时时，添加紧急样式
      if (days === 0) {
        const container = timer.closest(".countdown-container");
        if (container && container.classList.contains("countdown-urgent")) {
          // 根据小时数添加不同的紧急程度样式
          if (hours < 1) {
            // 最紧急 - 红色
            container.querySelectorAll(".countdown-unit").forEach((el) => {
              el.style.animation = "pulse 1s infinite";
            });

            // 更新消息
            const messageEl = container.querySelector(".countdown-message");
            if (messageEl) {
              messageEl.textContent = "最后机会！即将结束！";
              messageEl.style.animation = "blink 0.5s infinite";
              messageEl.style.color = document.body.classList.contains("dark") ? "#dc5c55" : "#fc5c65";
              messageEl.style.fontWeight = "bold";
            }
          }
        }
      }
    }

    // 初始更新
    updateAllCountdowns();
    console.log("初始化倒计时完成");

    // 设置定时器，每秒更新一次
    const countdownInterval = setInterval(updateAllCountdowns, 1000);
    console.log("设置了1秒更新间隔");

    // 为毫秒设置更快的更新频率
    const msElements = document.querySelectorAll(".countdown-ms");
    if (msElements.length > 0) {
      // 如果有毫秒元素，设置更快的更新频率
      const msInterval = setInterval(() => {
        countdownTimers.forEach(timer => {
          const msEl = timer.querySelector(".countdown-ms");
          if (!msEl) return;

          const endTimeStr = timer.getAttribute("data-end-time");
          if (!endTimeStr) return;

          const endTime = new Date(endTimeStr).getTime();
          const now = new Date().getTime();
          const distance = endTime - now;

          if (distance < 0) {
            msEl.textContent = "000";
            return;
          }

          const milliseconds = Math.floor(distance % 1000);
          msEl.textContent = milliseconds < 10 ? `00${milliseconds}` : milliseconds < 100 ? `0${milliseconds}` : milliseconds;
        });
      }, 50); // 每50毫秒更新一次毫秒显示
      console.log("设置了50毫秒更新间隔");

      // 清理函数
      window.addEventListener("beforeunload", () => {
        clearInterval(msInterval);
        clearInterval(countdownInterval);
        console.log("清理了定时器");
      });
    }
  }

  // 启动倒计时
  startCountdowns();

  // 检查URL哈希值，如果存在则滚动到对应部分并激活对应筛选
  if (window.location.hash) {
    const targetId = window.location.hash.substring(1);
    const targetElement = document.getElementById(targetId);
    if (targetElement) {
      setTimeout(() => {
        window.scrollTo({
          top: targetElement.offsetTop - 100,
          behavior: "smooth"
        });

        // 激活对应的导航标签
        const targetLink = document.querySelector(`.activity-nav a[href="#${targetId}"]`);
        if (targetLink) {
          navLinks.forEach((navLink) => {
            navLink.classList.remove("active");
          });
          targetLink.classList.add("active");
          
          // 触发筛选功能
          const event = new MouseEvent('click', {
            bubbles: true,
            cancelable: true,
            view: window
          });
          targetLink.dispatchEvent(event);
        }
      }, 300);
    }
  }
});

// 添加按钮交互反馈
function enhanceButtonInteractions() {
  // 为所有按钮添加点击波纹效果
  const allButtons = document.querySelectorAll("button, .btn, .btn-nav, a[class*='btn-']")
  
  allButtons.forEach(button => {
    // 添加点击波纹效果
    button.addEventListener('click', function(e) {
      // 创建波纹元素
      const ripple = document.createElement('span')
      ripple.classList.add('btn-ripple-effect')
      
      // 设置波纹位置
      const rect = this.getBoundingClientRect()
      const size = Math.max(rect.width, rect.height)
      const x = e.clientX - rect.left - size / 2
      const y = e.clientY - rect.top - size / 2
      
      ripple.style.width = ripple.style.height = `${size}px`
      ripple.style.left = `${x}px`
      ripple.style.top = `${y}px`
      
      // 确保按钮有相对定位
      if (getComputedStyle(this).position === 'static') {
        this.style.position = 'relative'
      }
      
      // 确保按钮有溢出隐藏
      this.style.overflow = 'hidden'
      
      // 添加波纹到按钮
      this.appendChild(ripple)
      
      // 动画结束后移除波纹
      setTimeout(() => {
        ripple.remove()
      }, 600)
    })
    
    // 添加按下效果
    button.addEventListener('mousedown', function() {
      this.style.transform = 'scale(0.97)'
    })
    
    // 添加释放效果
    button.addEventListener('mouseup', function() {
      this.style.transform = ''
    })
    
    // 确保鼠标离开时也恢复
    button.addEventListener('mouseleave', function() {
      if (this.style.transform === 'scale(0.97)') {
        this.style.transform = ''
      }
    })
  })
  
  // 为导航按钮添加特殊效果
  const navButtons = document.querySelectorAll('.activity-nav a')
  navButtons.forEach(button => {
    button.addEventListener('click', function() {
      // 添加点击后的视觉反馈
      this.style.transition = 'all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)'
      this.style.transform = 'scale(1.1)'
      
      setTimeout(() => {
        this.style.transform = ''
      }, 300)
    })
  })
}

// 添加倒计时数字变化动画
function enhanceCountdownAnimations() {
  const countdownNumbers = document.querySelectorAll('.countdown-number, .countdown-milliseconds')
  
  countdownNumbers.forEach(number => {
    // 保存当前值
    let currentValue = number.textContent
    
    // 创建一个MutationObserver来监视文本变化
    const observer = new MutationObserver(mutations => {
      mutations.forEach(mutation => {
        if (mutation.type === 'characterData' || mutation.type === 'childList') {
          const newValue = number.textContent
          
          // 如果值发生变化
          if (newValue !== currentValue) {
            // 添加变化动画
            number.style.animation = 'none'
            
            // 触发重绘
            void number.offsetWidth
            
            // 添加新动画
            number.style.animation = 'pulse 0.3s ease-out'
            
            // 更新当前值
            currentValue = newValue
          }
        }
      })
    })
    
    // 配置观察选项
    const config = { 
      characterData: true, 
      childList: true,
      subtree: true 
    }
    
    // 开始观察
    observer.observe(number, config)
  })
}

// 在倒计时初始化后调用这些增强函数
setTimeout(() => {
  enhanceButtonInteractions()
  enhanceCountdownAnimations()
  
  // 添加倒计时数字变化的CSS动画
  const style = document.createElement('style')
  style.textContent = `
    @keyframes numberChange {
      0% { transform: translateY(-10px); opacity: 0; }
      100% { transform: translateY(0); opacity: 1; }
    }
    
    .countdown-number.changing, .countdown-milliseconds.changing {
      animation: numberChange 0.3s ease-out;
    }
    
    /* 按钮波纹效果 */
    .btn-ripple-effect {
      position: absolute;
      border-radius: 50%;
      background-color: rgba(255, 255, 255, 0.3);
      transform: scale(0);
      animation: ripple 0.6s linear;
      pointer-events: none;
    }
    
    @keyframes ripple {
      0% { transform: scale(0); opacity: 0.5; }
      100% { transform: scale(2); opacity: 0; }
    }
    
    /* 确保所有按钮有平滑过渡 */
    button, .btn, .btn-nav, a[class*='btn-'] {
      position: relative;
      overflow: hidden;
      transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                  box-shadow 0.3s ease, 
                  background-color 0.3s ease, 
                  color 0.3s ease;
    }
  `
  document.head.appendChild(style)
}, 1000) // 给倒计时初始化一些时间
</script>

<script>
// 添加改进的夜间模式样式
document.addEventListener("DOMContentLoaded", function() {
  // 由于我们已经在style标签中添加了所有样式，这里不需要再动态添加
  console.log("夜间模式样式已加载");
});
</script>

{include file="common/footer" /}

